package com.ophelisis.common.config;

import com.thoughtworks.xstream.annotations.XStreamAlias;

/**
 * <pre>
 * Class : maker.config.ConfigModule / ConfigModule.java
 * 	Define Class Object : 각 실행 모듈에 대한 공통 설정 및 스케줄 에대한 설정을 담는다.
 * <br>
 * </pre>
 * @author hlee / apexcns,Inc.
 * @version 1.0
 * @see javadoc
 * @since 2012. 11. 15.
 */
@XStreamAlias("configModule")
public class ConfigModule extends ConfigSupport {
	/** <pre>
     * Definition of serialVersionUID : type of long
     * <br>
     * </pre>
     */
    private static final long serialVersionUID = 1361841270615779571L;

	private String prefixName;
	private String siteTitle;
	private String revision;
	
	public static ConfigModule newInstance() {
		return getConfig(ConfigModule.class);
	}

	public String getConfigPath() {
	    return ConfigUtil.getCollectorConfigModuleFile();
	}
	
	public void afterBind() {
	}

	/** <pre>
	 * Method : ConfigModule.getPrefixName()
	 * 	to get prefixName
	 * <br> 
	 * @return the prefixName : type of String
	 * </pre>
	 */
	public String getPrefixName() {
	    return prefixName;
	}

	/** <pre>
	 * Method : ConfigModule.setPrefixName()
	 * 	to set prefixName 
	 * <br> 
	 * @param prefixName : type of String
	 * </pre>
	 */
	public void setPrefixName(String prefixName) {
	    this.prefixName = prefixName;
	}

	public String getSiteTitle() {
		return siteTitle;
	}

	public void setSiteTitle(String siteTitle) {
		this.siteTitle = siteTitle;
	}

	/**
	 * @return the revision
	 */
	public String getRevision() {
		return revision;
	}

	/**
	 * @param revision the revision to set
	 */
	public void setRevision(String revision) {
		this.revision = revision;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString() 
	 * 
	 * Method : maker.config.ConfigModule.toString()
	 */
	@Override
	public String toString() {
	    StringBuilder builder = new StringBuilder();
	    builder.append("ConfigModule [");
	    builder.append("\n, prefixName=").append(prefixName);
	    builder.append("\n, siteTitle=").append(siteTitle);
	    builder.append("\n, revision=").append(revision);
	    builder.append("]");
	    return builder.toString();
	}
}
